package cc.mcggdd.leah.boot.stock.model.form;

import java.io.Serial;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
import java.time.LocalDate;
import java.math.BigDecimal;
import jakarta.validation.constraints.*;

/**
 * 负债管理表单对象
 *
 * @author 
 * @since 2025-02-10 11:15
 */
@Getter
@Setter
@Schema(description = "负债管理表单对象")
public class StockDebtForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "主键")
    private Long id;

    @Schema(description = "类型")
    @NotBlank(message = "类型不能为空")
    @Size(max=4, message="类型长度不能超过4个字符")
    private String type;

    @Schema(description = "主体")
    @NotBlank(message = "主体不能为空")
    @Size(max=64, message="主体长度不能超过64个字符")
    private String subject;

    @Schema(description = "金额")
    private BigDecimal amount;

    @Schema(description = "到账日期")
    private LocalDate arrivalDate;

    @Schema(description = "年化利率")
    private BigDecimal fate;

    @Schema(description = "利息")
    private BigDecimal fee;

    @Schema(description = "还款开始月份")
    @Size(max=10, message="还款开始月份长度不能超过10个字符")
    private String startDate;

    @Schema(description = "还款结束月份")
    @Size(max=10, message="还款结束月份长度不能超过10个字符")
    private String endDate;

    @Schema(description = "每月还款日")
    @NotNull(message = "每月还款日不能为空")
    private Integer dueDate;

    @Schema(description = "状态")
    @Size(max=5, message="状态长度不能超过5个字符")
    private String status;


}
